package com.example.nio.dao;

import com.example.nio.commons.ChatMessage;
import com.example.nio.commons.WxUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface WxUserMapper {
    @Select("select nickname,headImg,openid from wx_user_info where openid = #{openid}")
    WxUser getUserInfoByUsername(String openid);

    @Select("select IFNULL(IFNULL(alias_name,nickname),openid) from wx_user_info left join tourist_alias on openid = user_id where openid = #{openId}")
    String getNickname(String openId);

}
